//
//  ViewController.h
//  locationDemo
//
//  Created by xuesong zhou on 2021/2/27.
//

#import <Foundation/Foundation.h>
@class TXPosition;
@protocol TXLocationManagerDelegate <NSObject>

@required
- (void) didUpdateLocation:(TXPosition *)result;
- (void) didFailWithError:(NSError *)error;
@end
typedef NS_ENUM(NSInteger, TXLocationType) {
    online,
    offline
};
@interface TXLocationManager : NSObject
@property (nonatomic,weak) id<TXLocationManagerDelegate> delegate;
@property (nonatomic, readonly) TXPosition *location;
- (void)startScan;
- (void)stopScan;
- (void)setUpelecFlag:(bool)flag;
- (void)setUpelecUrl:(NSString *)url;
- (void)setLocationUrl:(NSString *)url;
- (void)setMapId:(NSString *)mapid;
- (void)setOpenId:(NSString *)oid;
- (void)setRequestTime:(int)time;
- (void)setShowLog:(bool)b;
- (void)setLocationType:(TXLocationType)type;
- (void)setOfflineFilePath:(NSString *)filePath;
- (NSString *)getVersion;
- (void)detectorNewStep:(double)values;
- (bool)detectorPeak:(double)newValue:(double)oldValue;
- (double)peakValleyThread:(double)value;
- (double)averageValue:(NSMutableArray *)value:(int)n;
@end

